A map of everything that decides what the player sees - sprites, text, backgrounds, the camera, effects and animated tiles - and which page covers which.
The GBA screen is 240 pixels wide and 160 tall. Everything the player sees on it is drawn from a few different kinds of thing, and each kind has its own rules. This section has one page for each.
| You want to | Read | The short version |
|---|---|---|
| Show a character, an item or a bullet | Drawing and the draw order | A sprite is a small picture that belongs to one instance. You choose which one, and what covers what. |
| Put words or numbers on the screen | Drawing text | Text is a row of small sprites, one per character. |
| Pin a score or a health bar to a corner of the screen | Screen anchors | An anchor is a named spot on the screen, like the top-left corner. You say "4 pixels in from there" instead of writing a screen-sized number. |
| Do a sum with the size of the screen, such as centring something | Screen anchors | screen_width and screen_height say how many pixels wide and tall the screen is, so you never type the number yourself. |
| Fill the screen behind everything with a big picture | Backgrounds | A background is one large picture the hardware scrolls as a single piece. It is not an instance. |
| Decide which part of a big room is shown | The camera | The screen is a window onto a world that can be much bigger. The camera moves the window. |
| Add sparks, smoke, flames or a dark room lit by torches | Effects | Particle systems and lights, started from code. |
| Make water, torches or a conveyor belt move | Tile animation | A tile that cycles through several pictures on its own. |
The GBA has a fixed amount of everything. It can draw at most 128 sprites in a single frame, and show at most four backgrounds. A frame is one picture of the game, and the GBA shows about 60 of them a second. Text, effects and health bars are made of sprites too, so they spend from the same 128 as your characters do.
That is why these pages keep coming back to the same limits. Budgets lists all of them in one place.
Almost every game begins with Drawing and the draw order, because it explains what happens when you write a Draw event. After that, take the page for whatever you are trying to put on the screen.